#ifndef _GAME_H_
#define _GAME_H_

#include <ctime>
#include "camera.h"
#include "character.h"
#include "stage.h"

#define TIME_TO_HIDE 60
#define TIME_TO_SEEK 35

#define ENEMY(self) (1-(self))

enum {
	PLAYER_1=0,
	PLAYER_2,
	NUM_PLAYERS
};

enum {
	PHASE_HIDE=0,
	PHASE_SEEK,
	NUM_PHASES
};

enum {
	SPLIT_SCREEN=0,
	DUAL_SCREEN,
	NUM_MODES
};

class Game {
	protected:
		int width, height, phase, gameMode;
		Camera cam;
		Character players[NUM_PLAYERS];
		Stage stage;
		time_t initial;

	public:
		Game(int mode = DUAL_SCREEN, const int width=800, const int height=600);
		virtual ~Game() { }

		inline int getGameMode() { return gameMode; }

		void reshapeFunc(int width, int height);
		void keyboardFunc(unsigned char key, int x, int y);

		void update();
		void drawMap(const int player);
		void draw(const int player);

		void restart();
};

#endif